using System.Windows;
using UltraLight.MVVM.Contracts;

namespace UltraLight.MVVM
{
    /// <summary>
    ///     Implementation of dialog using the built-in MessageBox
    /// </summary>
    public class Dialog : IDialog 
    {
        public bool ShowMessage(string title, string message, bool allowCancel)
        {
            return MessageBox.Show(message, title, allowCancel ? MessageBoxButton.OKCancel : MessageBoxButton.OK)
                    == MessageBoxResult.OK;
        }
    }
}